package io_nio;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;

/**
 * Created by butterfly on 2018/6/27.
 */
public class PrintStreamDemo {
    public static void main(String[] args) {
        PrintStream ps = null;
        try {
            FileOutputStream fos = new FileOutputStream("E:/pp3/copyDemo.txt");
            ps = new PrintStream(fos);
            ps.println("测试处理流输出222");//写入，换行
            ps.println(new PrintStreamDemo());

        }catch (IOException e){
            e.printStackTrace();
        }finally {
            ps.close();
        }
    }
}
